Hi, I'm fairly new to DXL, but have got to a stage where I think I have the basic operations I need going. One part that I'm particularly stuck on is updating the gui from the DXL script.
I have 4 drop-down choice menus and based on the item selected in the choice, I would like to have a label beside the choice that shows the number of items in that selected filter. The second choice is affected by both the first and the second choice menu. Searching around, it seems to suggest that this is not possible, and the only solution I have found is to have several labels which I hide/unhide based on the choices.
Is this the best solution? DataHoarder - Fri Mar 23 06:46:30 EDT 2018 |
Re: Update GUI of DXL Script Have you tried to do callbacks? If I understand you correctly you could have callbacks which collect the data from the choices and display it is one label. See example below.
|
Re: Update GUI of DXL Script Hi,
Thanks for your assistance with that, this works quite well. My only issue is that when the choice changes, it seems to lag. So when I change the choice in the selection, it carries out the callback based on the original choice, rather than what I have changed it to. When I then make a new selection, it updates to the second value, instead of the third.
Any ideas on where this lag is occurring? |
Re: Update GUI of DXL Script Jeez, I have had this issue before. I thought it has to do how you declare the choice DB. If you are using some of the optional parameters, strip them out and declare it just as Pekka Makinen did. If that works, then you can go back and figure out which parameter is causing the problem.
|
Re: Update GUI of DXL Script davidcs - Fri Mar 23 11:36:49 EDT 2018 Jeez, I have had this issue before. I thought it has to do how you declare the choice DB. If you are using some of the optional parameters, strip them out and declare it just as Pekka Makinen did. If that works, then you can go back and figure out which parameter is causing the problem.
Yes, if I modify my example so that the choice is editable:
then the callback function does not update the label with the selected value on selection, only on the next selection.
|
Re: Update GUI of DXL Script Thank you so much for all your help. On consideration, I've created an update buttons so that the choice boxes can be manipulated and then the stats updated. This is a better solution for my system as if it were to update after each choice box change there would be a pause as the stat is calculated.
But I do have the "true" on the end of my choice, so I agree that must be the cause. |